using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using Microsoft.TeamFoundation.Client;
using Microsoft.TeamFoundation.Common;
using Microsoft.TeamFoundation.WorkItemTracking;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
using Microsoft.TeamFoundation.Controls;

namespace Hemi
{
    public partial class WorkItemPicker : Form
    {
        PickWorkItemsControl _pickWorkItemsControl;

        public WorkItemPicker()
        {
            InitializeComponent();

            _pickWorkItemsControl = new PickWorkItemsControl(HemiContextSingleton.Instance.WorkItemStore, true);            
            _pickWorkItemsControl.Dock = DockStyle.Fill;
            _pickWorkItemsControl.SelectAllAfterRun = true;
            
            _queryGroupBox.Controls.Add(_pickWorkItemsControl);            
        }

        public PickWorkItemsControl Control
        {
            get
            {
                return _pickWorkItemsControl;
            }
        }

        private void _okButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;            
        }

        private void _cancelButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.Cancel;
        }
    }
} 